﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<dynamic>" %>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr class="br">
        <td height="26" colspan="3" class="style2">
            <strong>&nbsp;DANH MỤC SỬ DỤNG THẺ</strong>
        </td>
    </tr>
    <tr>
        <td>
            <div class="cat-item1">
                <div id="smoothmenu" class="ddsmoothmenu-v">
                    <ul>
                        <%List<Category> categoryList = (List<Category>)ViewData["FooterMenu"];
                          foreach (Category category in categoryList)
                          {%>
                        <li>
                        <a href="<%=FRouter._("danhmuc",category.ID.ToString(),category.CategoryName) %>">
                            <%=HttpUtility.HtmlEncode(category.CategoryName) %></a>
                            <% 
List<Category> subList = new CategoryDao().GetChildListByParentId(category.ID);
if (subList.Count > 0)
{%>
                            <ul>
                                <%
                                    foreach (Category catsub in subList)
                                    {%>
                                <li><a href="<%=FRouter._("danhmuc",catsub.ID.ToString(),catsub.CategoryName) %>">
                                    <%=HttpUtility.HtmlEncode(catsub.CategoryName)%></a></li>
                                <%} %>
                            </ul>
                            <%
}
                       
                            %>
                        </li>
                        <% }
                        %>
                    </ul>
                </div>
            </div>
        </td>
    </tr>
</table>
<script type="text/javascript">
    jQuery(document).ready(function () {
        ddsmoothmenu.init({
            mainmenuid: "smoothmenu",
            orientation: 'v',
            classname: 'ddsmoothmenu-v',
            contentsource: "markup" //"markup" or ["container_id", "path_to_menu_file"]
        });
    });    
</script>
